package com.oschina.bottle.log4j2.spring;

import org.springframework.context.ApplicationContext;
import org.springframework.core.env.ConfigurableEnvironment;

/**
 * 存储spring的环境变量
 *
 * @author <a href="mailto:zhongchao@gegejia.com">zhong</a>
 * @version 1.0 2016/11/21
 * @since 1.0
 */
public class SpringContext
{
    private static ConfigurableEnvironment environment;
    private static ApplicationContext applicationContext;

    public static ConfigurableEnvironment getEnvironment()
    {
        return environment;
    }

    public static void setEnvironment(ConfigurableEnvironment environment)
    {
        SpringContext.environment = environment;
    }

    public static ApplicationContext getApplicationContext()
    {
        return applicationContext;
    }

    public static void setApplicationContext(ApplicationContext applicationContext)
    {
        SpringContext.applicationContext = applicationContext;
    }
}
